﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace UniversalAdmin.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class InitSo : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateIndex(
                name: "IX_Users_LastLoginAt",
                table: "users",
                column: "LastLoginAt");

            migrationBuilder.CreateIndex(
                name: "IX_Users_Lockout",
                table: "users",
                columns: new[] { "LockoutEnd", "login_attempts" });

            migrationBuilder.CreateIndex(
                name: "IX_Users_Status",
                table: "users",
                column: "Status");

            migrationBuilder.CreateIndex(
                name: "IX_Users_UserName",
                table: "users",
                column: "UserName",
                unique: true);

            migrationBuilder.CreateIndex(
                name: "IX_Users_Username_Custom",
                table: "users",
                column: "Username");

            migrationBuilder.CreateIndex(
                name: "IX_TokenBlacklist_ExpireAt",
                table: "token_blacklist",
                column: "ExpireAt");

            migrationBuilder.CreateIndex(
                name: "IX_TokenBlacklist_Token",
                table: "token_blacklist",
                column: "Token");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_Users_LastLoginAt",
                table: "users");

            migrationBuilder.DropIndex(
                name: "IX_Users_Lockout",
                table: "users");

            migrationBuilder.DropIndex(
                name: "IX_Users_Status",
                table: "users");

            migrationBuilder.DropIndex(
                name: "IX_Users_UserName",
                table: "users");

            migrationBuilder.DropIndex(
                name: "IX_Users_Username_Custom",
                table: "users");

            migrationBuilder.DropIndex(
                name: "IX_TokenBlacklist_ExpireAt",
                table: "token_blacklist");

            migrationBuilder.DropIndex(
                name: "IX_TokenBlacklist_Token",
                table: "token_blacklist");
        }
    }
}
